package com.ruoyi.grape.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.grape.mapper.GrapeMethodMapper;
import com.ruoyi.grape.domain.GrapeMethod;
import com.ruoyi.grape.service.IGrapeMethodService;

/**
 * 防范补救措施Service业务层处理
 * 
 * @author ld
 * @date 2023-11-18
 */
@Service
public class GrapeMethodServiceImpl implements IGrapeMethodService 
{
    @Autowired
    private GrapeMethodMapper grapeMethodMapper;

    /**
     * 查询防范补救措施
     * 
     * @param methodId 防范补救措施主键
     * @return 防范补救措施
     */
    @Override
    public GrapeMethod selectGrapeMethodByMethodId(Long methodId)
    {
        return grapeMethodMapper.selectGrapeMethodByMethodId(methodId);
    }

    /**
     * 查询防范补救措施列表
     * 
     * @param grapeMethod 防范补救措施
     * @return 防范补救措施
     */
    @Override
    public List<GrapeMethod> selectGrapeMethodList(GrapeMethod grapeMethod)
    {
        return grapeMethodMapper.selectGrapeMethodList(grapeMethod);
    }

    /**
     * 新增防范补救措施
     * 
     * @param grapeMethod 防范补救措施
     * @return 结果
     */
    @Override
    public int insertGrapeMethod(GrapeMethod grapeMethod)
    {
        return grapeMethodMapper.insertGrapeMethod(grapeMethod);
    }

    /**
     * 修改防范补救措施
     * 
     * @param grapeMethod 防范补救措施
     * @return 结果
     */
    @Override
    public int updateGrapeMethod(GrapeMethod grapeMethod)
    {
        return grapeMethodMapper.updateGrapeMethod(grapeMethod);
    }

    /**
     * 批量删除防范补救措施
     * 
     * @param methodIds 需要删除的防范补救措施主键
     * @return 结果
     */
    @Override
    public int deleteGrapeMethodByMethodIds(Long[] methodIds)
    {
        return grapeMethodMapper.deleteGrapeMethodByMethodIds(methodIds);
    }

    /**
     * 删除防范补救措施信息
     * 
     * @param methodId 防范补救措施主键
     * @return 结果
     */
    @Override
    public int deleteGrapeMethodByMethodId(Long methodId)
    {
        return grapeMethodMapper.deleteGrapeMethodByMethodId(methodId);
    }
}
